/***************************************************************************
 *   KShootout - online shootout card game.                                *
 *   Copyright (C) 2008, 2009  MacJariel                                   *
 *                                                                         *
 *   KShootout is free software: you can redistribute it and/or modify     *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   KShootout is distributed in the hope that it will be useful,          *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with KShootout.  If not, see <http://www.gnu.org/licenses/>.    *
 ***************************************************************************/
#ifndef QUERYGETPARSER_H
#define QUERYGETPARSER_H

#include "queries.h"
#include <QXmlStreamWriter>
#include "parser/xmlnode.h"

class QueryGetParser
{
public:
    static QString elementName(Query::Type);

    static void write(QXmlStreamWriter*, const QueryGetPtr&);
    static QueryGetPtr read(XmlNode*);

    static void writeServerInfo(QXmlStreamWriter*, const QueryServerInfoGetPtr&);
    static QueryServerInfoGetPtr readServerInfo(XmlNode*);

    static void writeGameInfo(QXmlStreamWriter*, const QueryGameInfoGetPtr&);
    static QueryGameInfoGetPtr readGameInfo(XmlNode*);

    static void writeGameInfoList(QXmlStreamWriter*, const QueryGameInfoListGetPtr&);
    static QueryGameInfoListGetPtr readGameInfoList(XmlNode*);

    static void writeCardsetInfo(QXmlStreamWriter*, const QueryCardsetInfoGetPtr&);
    static QueryCardsetInfoGetPtr readCardsetInfo(XmlNode*);
};

#endif // QUERYGETPARSER_H
